﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Universitario.DAO
{
    public class CursoGraduacaoDAO
    {

        private static DataClasses1DataContext dc = new DataClasses1DataContext();

        public static Curso_Graduacao SelectByNome(String nome)
        {
            
            var query = from cursos in dc.Curso_Graduacaos
                        where cursos.nome == nome
                        select cursos;

            return query.FirstOrDefault();
        }
        public static List<String> getAll(){
            var query = from cursos in dc.Curso_Graduacaos
                        select cursos.nome;
            return query.ToList();
        }
    }
}